//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { DbInfo, DbInfoResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooDbInfoList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<DbInfoResponse>(`/uctoo/db_info/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooDbInfo = async (id: string) => {
  return requestClient.get<DbInfo>(`/uctoo/db_info/${id}`);
};

export const adductooDbInfo = async (data: Partial<DbInfo>) => {
  return requestClient.post<DbInfo>('/uctoo/db_info/add', data);
};

export const edituctooDbInfo = async (data: Partial<DbInfo>) => {
  return requestClient.post<DbInfo>('/uctoo/db_info/edit', data);
};

export const deleteuctooDbInfo = async (id: string) => {
  return requestClient.post<any>('/uctoo/db_info/del', { id });
};
